//
//  ZMNetWorkingRequest.h
//  ZMUnderFrameWorkDemo
//
//  Created by chenzm on 2020/4/29.
//  Copyright © 2020 MAC. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"

NS_ASSUME_NONNULL_BEGIN

@interface ZMNetWorkingRequest : NSObject
@property (nonatomic, strong) AFHTTPSessionManager *manager;

+ (instancetype)share;
/// Post请求
- (NSURLSessionDataTask *)zm_postUrl:(NSString *)url params:(NSDictionary *)params success:(void (^)(NSDictionary * response))success failure:(void (^)(NSError * error))failure;
/// Get请求
- (NSURLSessionDataTask *)zm_getUrl:(NSString *)url params:(NSDictionary *)params success:(void (^)(NSDictionary * response))success failure:(void (^)(NSError * error))failure;
/// 图片上传
- (NSURLSessionDataTask *)zm_uploadFileUrl:(NSString *)url
                fileType:(NSInteger)fileType
                filesArr:(NSArray *)filesArr
                  params:(NSDictionary *)params
                 maxByte:(NSInteger)maxByte// 最大上传质量 单位kB 0、默认原件上传
                 success:(void (^)(NSDictionary * response))success
                 failure:(void (^)(NSError * error))failure;



+ (NSDictionary *)jsonToDic:(NSData *)jsonData;


@end

NS_ASSUME_NONNULL_END
